package org.xp.judgeplatform.converter;

import org.mapstruct.Mapper;
import org.xp.judgeplatform.pojo.entity.ChatMessage;
import org.xp.judgeplatform.pojo.entity.ChatSession;
import org.xp.judgeplatform.pojo.vo.ChatVO.ChatMessageVO;
import org.xp.judgeplatform.pojo.vo.ChatVO.ChatSessionVO;

import java.util.List;

@Mapper(componentModel = "spring")
public interface ChatConverter {

    ChatSessionVO toChatSessionVO(ChatSession session);

    // 列表转换
    List<ChatSessionVO> toChatSessionVOList(List<ChatSession> sessions);

    ChatMessageVO toChatMessageVO(ChatMessage message);

    // 列表转换
    List<ChatMessageVO> toChatMessageVOList(List<ChatMessage> messages);
}
